<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ArNetworking: ArServerDataProvider&lt; C, T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ArNetworking
   &#160;<span id="projectnumber">dev20180125</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArServerDataProvider.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classArServerDataProvider-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArServerDataProvider&lt; C, T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Tool to easily obtain and provide changing data values from an acessor method of a class.  
 <a href="classArServerDataProvider.html#details">More...</a></p>

<p><code>#include &lt;ArServerDataProvider.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7cc4c35fcde11f1dec19bfcf8adebf65"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArServerDataProvider.html#a7cc4c35fcde11f1dec19bfcf8adebf65">ArServerDataProvider</a> (<a class="el" href="classArServerBase.html">ArServerBase</a> *server, const char *name, const char *description, <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArRetFunctor.html">ArRetFunctor</a>&lt; T &gt; *accessFunctor, <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor.html">ArFunctor</a> *lockFunctor=NULL, <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor.html">ArFunctor</a> *unlockFunctor=NULL)</td></tr>
<tr class="memdesc:a7cc4c35fcde11f1dec19bfcf8adebf65"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this constructor is used, then access data by invoking the <em>accessFunctor</em> <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArRetFunctor.html">ArRetFunctor&lt;T&gt;</a> object.  <a href="#a7cc4c35fcde11f1dec19bfcf8adebf65">More...</a><br /></td></tr>
<tr class="separator:a7cc4c35fcde11f1dec19bfcf8adebf65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23c11938227b6c7b1db7d901fc502b70"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArServerDataProvider.html#a23c11938227b6c7b1db7d901fc502b70">ArServerDataProvider</a> (<a class="el" href="classArServerBase.html">ArServerBase</a> *server, const char *name, const char *description, C *obj, T(C::*method)(void), void(C::*lockMethod)(void)=NULL, void(C::*unlockMethod)(void)=NULL)</td></tr>
<tr class="memdesc:a23c11938227b6c7b1db7d901fc502b70"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this constructor is used, then access data by calling <em>method</em> on object instance <em>obj</em>.  <a href="#a23c11938227b6c7b1db7d901fc502b70">More...</a><br /></td></tr>
<tr class="separator:a23c11938227b6c7b1db7d901fc502b70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3662c11d11587a5de7f2f76215b04c73"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArServerDataProvider.html#a3662c11d11587a5de7f2f76215b04c73">ArServerDataProvider</a> (<a class="el" href="classArServerBase.html">ArServerBase</a> *server, const char *name, const char *description, C *obj, T(C::*method)(void) const, void(C::*lockMethod)(void)=NULL, void(C::*unlockMethod)(void)=NULL)</td></tr>
<tr class="memdesc:a3662c11d11587a5de7f2f76215b04c73"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this constructor is used, then access data by calling <em>method</em> on object instance <em>obj</em>.  <a href="#a3662c11d11587a5de7f2f76215b04c73">More...</a><br /></td></tr>
<tr class="separator:a3662c11d11587a5de7f2f76215b04c73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09032b9acb2ac1af005c21361e29abb8"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArServerDataProvider.html#a09032b9acb2ac1af005c21361e29abb8">~ArServerDataProvider</a> ()</td></tr>
<tr class="separator:a09032b9acb2ac1af005c21361e29abb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class C, typename T&gt;<br />
class ArServerDataProvider&lt; C, T &gt;</h3>

<p>Tool to easily obtain and provide changing data values from an acessor method of a class. </p>
<p>The data item is added to the server, and when clients make requests, this object will call a lock method on a target object (if provided), then obtain a value to reply with by calling the given accessor method on the target object, then call the unlock method (if provided). You can supply these methods either as function pointers (within the class of the target object), or <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor.html">ArFunctor</a> objects.</p>
<p>Client programs can use <a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a> to request and receive updates on the value.</p>
<dl class="section note"><dt>Note</dt><dd>This object must remain in scope and not be destroyed to remain active. If this object is deleted (explicitly or if execution leaves scope in which the object was created) then the data item is removed from the server and clients will no longer receive updates.</dd></dl>
<p>Replies with data are sent via TCP.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArClientDataReceiver.html" title="A client program may use this to receive responses to data requests and pass the received data to a p...">ArClientDataReceiver</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>2.9.3  </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7cc4c35fcde11f1dec19bfcf8adebf65"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a>&lt; C, T &gt;::<a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArServerBase.html">ArServerBase</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArRetFunctor.html">ArRetFunctor</a>&lt; T &gt; *&#160;</td>
          <td class="paramname"><em>accessFunctor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor.html">ArFunctor</a> *&#160;</td>
          <td class="paramname"><em>lockFunctor</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor.html">ArFunctor</a> *&#160;</td>
          <td class="paramname"><em>unlockFunctor</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If this constructor is used, then access data by invoking the <em>accessFunctor</em> <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArRetFunctor.html">ArRetFunctor&lt;T&gt;</a> object. </p>
<p>If <em>lockFunctor</em> and <em>unlockFunctor</em> are provided (not NULL), then these are invoked before and after invoking <em>accessFunctor</em>. </p>

</div>
</div>
<a class="anchor" id="a23c11938227b6c7b1db7d901fc502b70"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a>&lt; C, T &gt;::<a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArServerBase.html">ArServerBase</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">C *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T(C::*)(void)&#160;</td>
          <td class="paramname"><em>method</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(C::*)(void)&#160;</td>
          <td class="paramname"><em>lockMethod</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(C::*)(void)&#160;</td>
          <td class="paramname"><em>unlockMethod</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If this constructor is used, then access data by calling <em>method</em> on object instance <em>obj</em>. </p>
<p>If <em>lockMethod</em> and <em>unlockMethod</em> are provided (not NULL), then these are called before and after calling <em>method</em>. </p>

</div>
</div>
<a class="anchor" id="a3662c11d11587a5de7f2f76215b04c73"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a>&lt; C, T &gt;::<a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArServerBase.html">ArServerBase</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">C *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T(C::*)(void) const&#160;</td>
          <td class="paramname"><em>method</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(C::*)(void)&#160;</td>
          <td class="paramname"><em>lockMethod</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(C::*)(void)&#160;</td>
          <td class="paramname"><em>unlockMethod</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If this constructor is used, then access data by calling <em>method</em> on object instance <em>obj</em>. </p>
<p>If <em>lockMethod</em> and <em>unlockMethod</em> are provided (not NULL), then these are called before and after calling <em>method</em>. This version allows <em>method</em> to be <code>const</code>. </p>

</div>
</div>
<a class="anchor" id="a09032b9acb2ac1af005c21361e29abb8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C, typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a>&lt; C, T &gt;::~<a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>References <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArFunctor.html#a1c87b5ef305e653fe13258ebe77faee3">ArFunctor::invoke()</a>, <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#a43a8b3789126c818f390f24bdbceccce">ArLog::log()</a>, <a class="el" href="classArServerBase.html#a4f80293250011fbcd0817457c5f59bc8">ArServerBase::remData()</a>, and <a class="elRef" doxygen="/home/reed/amrsw/Aria/docs/Aria.tag:../../docs/" href="../../docs/classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a6e80d09c67dad73e9ba736e91ec893be">ArLog::Verbose</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="ArServerDataProvider_8h.html">ArServerDataProvider.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArServerDataProvider.html">ArServerDataProvider</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
